<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>认购确认信息审核</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select.css">
	<style>
		.text-name {
		    display: inline-block;
		    padding: 5px 0px;
		    color: #666;
		    width: auto;
		    font-size: 14px;
		    text-align: right;
		}
		.content-table-three{
			width: 1080px;
		}
		.content-table-three tbody tr td {
		    max-width: 250px;
		    min-width: 30px;
		}
		.content-table-three tbody tr td p {
		    text-align: right;
		    padding-left: 12px;
		}
		.content-table-three tbody tr td span{
			padding-right: 12px;
		}
		.content-table-three tbody tr td:nth-child(1){
			width: 40px;
			text-align: center;
		}
		.content-table-three tbody tr td:nth-child(2){
			width: 115px;
			text-align: center;
		}
		.content-table-three tbody tr td:nth-child(3){
			width: 200px;
		}
		.content-table-three tbody tr td:nth-child(4){
			width: 175px;
		}
		.content-table-three tbody tr td:nth-child(5){
			width: 165px;
		}
		.content-table-three tbody tr td:nth-child(6){
			width: 170px !important;
		}
		.content-table-three tbody tr td:nth-child(2) span{
			width: 50px;
		}
		.content-table-three tbody tr td:nth-child(3) span{
			width: 150px;
		}
		.content-table-three tbody tr td:nth-child(4) span{
			width: 110px;
		}
		.content-table-three tbody tr td:nth-child(5) span{
			width: 110px;
		}
		.content-table-three tbody tr td:nth-child(6) span{
			width: 115px;
		}
		.content-table-three tbody tr:nth-child(2) td p {
		    text-align: left;
		}
		.content-table-three tbody tr:nth-child(2) td p>span {
		    width: auto;
		}

		.content-btn {
		    padding-bottom: 5px;
		}
		.export-btn {
		    float: left;
		    margin-top: 0px;
		    margin-right: 12px;
		}
		.content-btn> .btn-style-two {
		    float: right;
		    margin-left: 8px;
		}
		.rowspanbg{
			background: #F9FBFF;
		}
		.color-operation:hover {
		    text-decoration: underline;
		    cursor: pointer;
		}
	</style>
</head>
<body>
	<div class="main-content">
		<div class="main-bg">
			<p class="content-title">总部信息审核</p>
			<form id="seachContractInboundForm">  
			   <input name="confirtrackstatusList[0]" value="2"  type="hidden">
			   <input name="confirtrackstatusList[1]" value="3"  type="hidden">
			   <input name="confirtrackstatusList[2]" value="4"  type="hidden">
				<div class="content-form">
					<ul>
						<li><span class="text-name">项目名称：</span><input name="projectname" type="text"></li>
						<li><span class="text-name">客户名称：</span><input  name="appoint.custname" type="text"></li>
						<li><span class="text-name">状态：</span>
						<select class="multiselect" id="single">
							<option value="">草稿</option>
							<option value="">待审核</option>
							<option value="">审核通过</option>
							<option value="">审核驳回</option>
						</select></li>
						<li><button class="btn-style-two" type="button" id="seachContractInbound">搜索</button><i class="btn-operation maleft20">重置</i></li>
					</ul>
				</div>
			</form>
			<div class="content-btn">
						<button class="export-btn clearfix" onclick="alltoExamine()">全部审核通过</button>
						<button class="btn-style-two clearfix">下载附件</button>
						<button class="btn-style-two clearfix">导出</button>
						<button class="btn-style-two clearfix">全选</button>
					</div>
			<div class="content-list"> 
				<div class="info-list" dataTableTable = "true" bindClick = "seachContractInbound" bindForm = "seachContractInboundForm"  dataAction = "/contractDetail/findListExamine">				
					<table class="content-table-three" cellspacing="0" cellpadding="0">
						<tbody>
							<tr>
								<td class="rowspanbg"><input type="checkbox"></td>							
								<td type="op">															
								</td>							
								<td>
									<p>项目编号：<span type = "table" name = "projectcode"></p>
									<p>项目名称：<span type = "table" name = "projectname"></p>
									<p>部门名称：<span type = "table" name = "appoint.departmentname"></p>
								</td>
								<td>
									<p>客户编号：<span type = "table" name = "appoint.custcode"></p>
									<p>客户名称：<span type = "table" name = "appoint.custname"></p>
									<p>客户证件号：<span type = "table" name = "appoint.credentialnumber"></p>
								</td>
								<td>
									<p>开户行：<span type = "table" name = "confirtrackDetail.bank"></p>
									<p>银行卡号：<span type = "table" name = "confirtrackDetail.bankno"></p>
									<p>开户行号：<span type = "table" name = "confirtrackDetail.account"></p>
								</td>
								<td>
									<p>理顾名称：<span type = "table" name = "isname"></p>
									<p>到账金额：<span type = "table" name = "transfercash"></p>
									<p>分发时间：<span type = "table" name = "issuedate"></p>
								</td>
							</tr>
						</tbody>
					</table>					
				</div>
			</div>
		</div>
		<!-- <div class="table-pages clearfix">
			<ul class="pages-list">
				<li><a href=""><</a></li>
				<li><a class="menu-active" href="">1</a></li>
				<li><a href="">2</a></li>
				<li><a href="">3</a></li>
				<li><a href="">...</a></li>
				<li><a href="">20</a></li>
				<li><a href="">></a></li>
			</ul>
		</div> -->
	</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script src="js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
	<script type="text/javascript" src = "js/tableTable.js"></script>
    <script type="text/javascript">
        $(document).ready(function (){//新增
			$('.multiselect').multiselect({setMaxOptionNum:4,selectedHtmlValue:''});
			$('#single').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 140+'px'});
			$('#single1').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 140+'px'});
		 });
        function lrzl(my){
        	my = $(my);
        	var index = my.parent().parent().parent().parent().find("input[name='index']").val();
        	var data = $("div[dataTableTable = 'true']").getAllTableData()[index];
        	parent.setData(data);
        	if(date.confirtrackstatus ==3||date.confirtrackstatus ==4){
        		window.location.href="lookdataAudit.html";
        	}
        	else{
        		window.location.href="lookdataEntry.html";
        	}
    	}
        function alltoExamine(){
        	var datas =[];
			$('.info-list').find('table').each(function(){
				var $this = $(this);
				var $input = $this.children('tbody').children('tr').eq(0).children('td').eq(0).find('input');
				 if ($input.is(':checked')) {
					 var index =$input.parent().parent().parent().find("input[name='index']").val();
					 var data = $("div[dataTableTable = 'true']").getAllTableData()[index];
					 datas.push(data);
				 }					
			})
			if(datas.length == 0 ){
				layer.msg("请至少选择一条需要审核的认购确认书！",{
				    offset:'20%'
				});	
				
				return  false;
			}
			for (var i = 0; i < datas.length; i++) {
				console.log(datas[i].confirtrackstatus);
				if(datas[i].confirtrackstatus !=2){
					layer.msg("请选择都为带审核的认购确认书",{
    				    offset:'20%'
    				});			
					return  false;
				}
			}	
			parent.setData(datas);
			var data = $(my).attr('data-id');
        	parent.setData(data);
        	parent.layer.open({
			      type: 2,
			      title: '审核',
			      shadeClose: true,
			      shade: 0.2,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['870px', '450px'],
			      content: 'AlltoExamine.html',
			      end:function(){
					$('div[dataTableTable="true"]').ECDATableTable();
				  }
			    });
        }
        function toExamine(my){
        	var data = $(my).attr('data-id');
        	parent.setData(data);
        	parent.layer.open({
			      type: 2,
			      title: '审核',
			      shadeClose: true,
			      shade: 0.2,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['870px', '450px'],
			      content: 'toExamine.html',
			      end:function(){
					$('div[dataTableTable="true"]').ECDATableTable();
				  }
			    });
        }
        function tableCallBack($this){
       	 
        }
        function opCallBack($this,date){
        	 if(date.confirtrackstatus){
        		 if(date.confirtrackstatus ==2){
        			 $this.append('	<i onclick = "toExamine(this)" data-id="'+date.id+'" class="btn-operation">审核</i><i onclick = "lrzl(this)" data-id="'+date.id+'" class="btn-operation">查看</i>');	
        		 }
        		 if(date.confirtrackstatus ==3){
        			 $this.append('<i onclick = "lrzl(this)" data-id="'+date.id+'" class="btn-operation">查看</i>');	
        		 }
        	 }
      /*   	console.log(date.confirtrackstatus);
         $this.append('	<i onclick = "lrzl(this)" data-id="'+date.id+'" class="btn-operation">查看</i>'); */
        }
	</script>

</body>
</html>